<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
          margin: 0;
          padding: 0;
        }
        .box{
            width: 1200px;
            height: 100px;
        }
        .box1 {
            width: 100px;
            height: 100px;
            background-color: green;
            transition: all 5s;
        }
        .box:hover>.box1 {
            /* 里面的值为deg 为度数  可以为负值*/
            transform: rotate(720deg);
            /* transform: translateX(300px); */
            /* padding-left: 500px; */
            margin-left: 800px;
            background-color:yellowgreen;
        }
        .box2{
            position: relative;
            width: 300px;
            height: 50px;
            border:1px solid #000000
        }
        .box3{
            position: absolute;
            top: 15px;
            right: 15px;
            transform: rotate(-45deg);
            width: 20px;
            height: 20px;
            transition: all 1s;
            border-left:1px solid #000000;
            border-bottom:1px solid #000000;
        }
        .box2:hover .box3{
            transform: rotate(135deg);
        }
    </style>
</head>

<body>
    <div class="box"><div class="box1"></div></div>
    <div class="box2"><div class="box3"></div></div>
</body>
</html>